package com.jielin.handling.util;

import java.io.File;

/**
 *
 */
public class ConstantUtil {
    //TOKEN过期时间_4小时
    public static long USER_TOKEN_EXPIRE = 60 * 60 * 4;

    //项目根目录
    public static final String ROOT_PATH = File.separator + "data" + File.separator;


    //图片根目录
    public static final String PHOTO_PATH = ROOT_PATH + "photo" + File.separator;

    //视频管理模块视频存放路劲
    public static final String VIDEOMANAGE_PATH = ROOT_PATH + "video" + File.separator;

    //卷宗文件存放根目录
    public static final String FILE_PATH = ROOT_PATH + "dossier" + File.separator;

    //卷宗压缩文件存放根目录
    public static final String FILEZIP_PATH = ROOT_PATH + "dossier" + File.separator + "zip" + File.separator;

    //签字指纹图片暂存路径
    public static final String SIGN_AND_FINGERPRINT_PATH = ROOT_PATH + "signandfingerprint" + File.separator;
    /**
     * 笔录索引文件夹目录
     */
    public static final String INDEX_DIR = ROOT_PATH + "indexDir" + File.separator;

    //XSKY_地址
//    public static final String XSKY_SERVER_URL = "192.168.92.4:8060";
    public static final String XSKY_SERVER_URL = "192.168.2.164:8060";

    //XSKY_BUCKET（图片）
    public static final String XSKY_BUCKET_PHOTO = "jl-bucket-photo";

    //XSKY_BUCKET（音频 ）
    public static final String XSKY_BUCKET_AUDIO = "jl-bucket-audio";

    //XSKY_BUCKET（视频 ）
    public static final String XSKY_BUCKET_VIDEO = "jl-bucket-video";

    //XSKY_BUCKET（电子卷宗）
    public static final String XSKY_BUCKET_DOSSIER = "jl-bucket-dossier";

    //XSKY_文件HTTP访问地址
//    public static final String XSKY_FILE_URL = "http://59.204.92.87:8060/";
    public static final String XSKY_FILE_URL = "http://192.168.2.164:8060/";

    /**
     * XSKY_AK 访问秘钥
     */
//    public static final String XSKY_ACCESS_KEY = "R6U8UJR33RDS30AC7LPU";
    public static final String XSKY_ACCESS_KEY = "3GC7QYTQ34AIGW94SK5Z";

    /**
     * XSKY_SK 安全秘钥
     */
//    public static final String XSKY_SECRET_KEY = "yrxADv2euCOy8HSPL0i4j6O9aWlgiGAj0p0KuB1l";
    public static final String XSKY_SECRET_KEY = "jKeXAmNa5CXCe6g1FIYjDQGNX3drAdMA9fPSnaIs";

    /**
     * XSKY_文件HTTP访问地址前缀
     */
    public static final String XSKY_PREPATH_URL = XSKY_FILE_URL + XSKY_BUCKET_DOSSIER + "/";

    /**
     * XSKY图片HTTP访问地址
     */
    public static final String XSKY_PHOTO_URL = XSKY_FILE_URL + XSKY_BUCKET_PHOTO + "/";

    /**
     * 前端默认mp3文件的缩略图
     */
    public static final String WEB_MP3FILE_PATH = returnIp() + "/images/caseCenter/default-music.png";
    /**
     * 前端默认文件的缩略图
     */
    public static final String WEB_DEFAULTFILE_PATH = returnIp() + "/images/caseCenter/default-file.png";

    /**
     * 缩略图路径
     */
    public static final String THUMBNAIL = "thumbnail";

    //nginx服务器图片地址
    public static final String SERVER_URL = returnIp() + File.separator + "photo";

    //物品返还nginx路径
    public static final String PDF_PATH = returnIp();

    // 审讯录像加水印logo路径
    public static final String WATERMARKIMAGEG_PATH = "/data/logo.png";

    // ffmpeg==》linux-amd64
    public static final String FFMPEG_PATH_LINUX_AMD64 = "/data/ffmpeg-Linux/ffmpeg-git-20190629-amd64-static/ffmpeg";

    // ffmpeg==》linux-i386
    public static final String FFMPEG_PATH_LINUX_I386 = "/data/ffmpeg-Linux/ffmpeg-git-20190629-i686-static/ffmpeg";

    // ffmpeg==》win32-amd64
    public static final String FFMPEG_PATH_WIN32_AMD64 = "C:\\Users\\WIN10\\Downloads\\ffmpeg-20190701-e51cc7e-win64-static\\bin\\ffmpeg.exe";

    // ffmpeg==》win32-x86
    public static final String FFMPEG_PATH_WIN32_X86 = "C:\\Users\\WIN10\\Downloads\\ffmpeg-20190704-43e0ddd-win32-static\\bin\\ffmpeg.exe";

    /**
     * 逗号分隔符
     */
    public static String COMMA_SEPARATOR = ",";

    // 审讯录像视频存放根目录
    public static final String FILEVIDEO_PATH = ROOT_PATH + "dossier" + File.separator
            + "RecordVideoFile" + File.separator;

    // 审讯录像加水印视频存放根目录
    public static final String WATERMARKVIDEO_PATH = ROOT_PATH + "dossier"
            + File.separator + "RecordVideoFile" + File.separator + "out" + File.separator;

    /**
     * 设置返回不同的图片地址
     */
    public static final String RETURN_PHOTO = "3";


    /**
     * @return 返回ip与port
     */
    public static String returnIp() {
        switch (RETURN_PHOTO) {
            case "1":
                return "http://59.204.92.96:80";
            case "3":
                return "http://192.168.2.163:80";
            case "4":
                return "http://192.168.2.99:80";
            case "5":
                return "http://121.43.172.22:83";
            default:
                return "";
        }
    }

    /**
     * @return 返回男性嫌疑人头像地址
     */
    public static String returnManPhoto() {
        return returnIp() + "/images/caseCenter/personM.png";
    }

    /**
     * @return 返回女性嫌疑人头像地址
     */
    public static String returnWoManPhoto() {
        return returnIp() + "/images/caseCenter/personW.png";
    }

    /**
     * @return 返回男性民警头像地址
     */
    public static String returnPoliceManPhoto() {
        return returnIp() + "/images/caseCenter/policeM.png";
    }

    /**
     * @return 返回女性民警头像地址
     */
    public static String returnPoliceWoManPhoto() {
        return returnIp() + "/images/caseCenter/policeW.png";
    }

    /**
     * 使用XSKY存储
     */
    public static boolean XSKYRESTORAGE = true;


    //mysql定时任务导入的数据
    public static final String TXT_PATH = File.separator + "home" + File.separator + "mysql" + File.separator + "table" + File.separator;


    //三合一音频存放路劲
    public static final String VIOCE_PATH = ROOT_PATH + "voice" + File.separator;

    //三合一文件绝对路径
    public static final String VIOCE_URL = "http://10.76.129.67/wavfile/";
}
